package com.mvc.business.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mvc.business.service.TaskManager;

@Controller
@RequestMapping("task")
public class TaskController {
	@Autowired
	private TaskManager	taskManager;

	@RequestMapping("run")
	public String run(ModelMap modelMap) {
		taskManager.runTask();
		modelMap.addAttribute("result", true);
		return "jsonView";
	}
}
